package com.joshcough.scrabble

import org.testng.annotations.Test
import WordMatchers._
import pimped.Equalizer._
import search.Criteria._

class WordTest {

  @Test
  def testSearch {
    var word = Word("ketoid")
    word(includes_all("key")) mustBe true
    word(starts_with("key")) mustBe true
    word(max_length(4)) mustBe false
    word(max_length(6)) mustBe true
    word(max_length(6) or min_length(2)) mustBe true
  }
}

